Util: Use end line instead of start line for actual results - #12212
Merged
hvitved merged 7 commits intoFeb 20, 2023
Merged
Conversation
hvitved
force-pushed
the
util/inline-expect-test-use-end-line
branch
2 times, most recently
from
February 17, 2023 11:55
7b26820 to
19c60af
Compare
hvitved
force-pushed
the
util/inline-expect-test-use-end-line
branch
from
February 17, 2023 12:24
19c60af to
87bf945
Compare
hvitved
marked this pull request as ready for review
February 17, 2023 12:30
hvitved
force-pushed
the
util/inline-expect-test-use-end-line
branch
from
February 17, 2023 14:20
87bf945 to
59efcd5
Compare
tausbn
approved these changes
Feb 17, 2023
tausbn
left a comment
Contributor
There was a problem hiding this comment.
Python bits look good to me. 👍
owen-mc
approved these changes
Feb 18, 2023
owen-mc
left a comment
Contributor
There was a problem hiding this comment.
I think it looks slightly worse, but maybe I'm just used to the old way, and you do give at least one advantage. Approved for go.
MathiasVP
approved these changes
Feb 18, 2023
geoffw0
approved these changes
Feb 20, 2023
geoffw0
left a comment
Contributor
There was a problem hiding this comment.
Swift 👍. We're adding a lot of tests and models at the moment, I would appreciate if you merge in latest main and re-run the checks just before merging.
erik-krogh
approved these changes
Feb 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the semantics of the inline test expectations framework, from using start-line to using end-line for actual results (we still use start-line for expected results).
The motivation for this is that two entities may share start line, which makes it impossible to add unambiguous test expectations. For example, for chained calls
both calls have the same start-line (the output of the call to
M1is an argument of the call toM2), but they have different end lines. By using end-line instead of start-line, we can meaningfully add expectations such as